const path = require('path')
const resolve = (dir) => path.join(__dirname, dir)
module.exports = {

  chainWebpack(config) {
    // set svg-sprite-loader
    // config.module
    //   .rule('svg')
    //   .exclude.add(resolve('src/icons'))
    //   .end()
    // config.module
    //   .rule('icons')
    //   .test(/\.svg$/)
    //   .include.add(resolve('src/icons'))
    //   .end()
    //   .use('svg-sprite-loader')
    //   .loader('svg-sprite-loader')
    //   .options({
    //     symbolId: 'icon-[name]'
    //   })
    //   .end()
    config.resolve.alias
      .set("@", resolve("src"))
      .set("assets", resolve("src/assets"))
      .set("components", resolve("src/components"))
      .set("store", resolve("src/store"))
      .set("router", resolve("src/router"))
      .set("api", resolve("src/api"))
      .set("utils", resolve("src/utils"))
      .set("views", resolve("src/views"))
      .set("filters", resolve("src/filters"))
      .set("styles", resolve("src/styles"))
  },
  devServer: {
    // proxy: "http://127.0.0.1:9880"
  }

}
